import Mock from 'mockjs'
import resAPI from './res'



const deptTreeList = [{
                        id: 1,
                        label: '董事会'
                    }, {
                        id: 2,
                        label: '移动互联网事业部',
                        children: [
                            {id: 21, label: '智能会务'}, 
                            {id: 22, label: '钉钉集成'}, 
                            {id: 23, label: '员工关爱平台'}
                        ]
                    }, {
                        id: 3,
                        label: '临时总部',
                        children: [
                            {id: 31, label: '很多',children: [
                                {id: 311, label: '很多子集yi', children: [
                                    {id: 411, label: '最下级'}
                                ]}, 
                                {id: 322, label: '很多子集er'}, 
                                {id: 323, label: '很多子集san'}
                            ]}, 
                            {id: 32, label: '财务部'}, 
                            {id: 33, label: 'it部门'}
                        ]
                    }
]

const treeList = [{
    id: 1,
    label: '董事会',
    avatar: Mock.mock('@image(200x200,@hex())'),
    must: false,
    children: [{
        id: 4,
        label: '闻名',
        avatar: Mock.mock('@image(200x200,@hex())'),
        must: true 
    },{
        id: 9,
        label: '张科',
        avatar: Mock.mock('@image(200x200,@hex())'),
        must: true
    }]
}, {
    id: 2,
    label: '移动互联网事业部',
    children: [{
        id: 5,
        label: '智能会务',
        must: false,
        children: [{
            id:51,
            label: '里心想',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        },{
            id:52,
            label: '谢雷',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        },{
            id:53,
            label: '崔弘为',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        },{
            id:54,
            label: '陈南方',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        },{
            id:55,
            label: '龚洁',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        }]
    }, {
        id: 6,
        label: '钉钉集成',
        must: false,
        children: [{
            id: 61,
            label: '石鹏',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        },{
            id: 62,
            label: '熊玲',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        },{
            id: 63,
            label: '薇薇',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        },{
            id: 64,
            label: '梧桐',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        },{
            id: 65,
            label: '刘谦',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        }]
    }, {
        id: 10,
        label: '员工关爱平台',
        must: false,
        children: [{
            id: 11,
            label: '胡明伟',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        },{
            id: 12,
            label: '徐小周',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        },{
            id: 13,
            label: '龚洁',
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        },{
            id: 14,
            label: Mock.mock('@cname'),
            avatar: Mock.mock('@image(200x200,@hex())'),
            must: true
        }]
    }]
}]

export default {
  getTreeList: _ => {
      return resAPI.ok(treeList)
  },
  getDeptTreeList: _ => {
      return resAPI.ok(deptTreeList)
  }
}
